package com.zxl.gtion.controller;

import com.zxl.gtion.service.ArticleInfoService;
import com.zxl.gtion.util.R;
import com.zxl.gtion.vo.ArticleInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * (ArticleInfo)表控制层
 *
 * @author 
 * @since 2024-03-06 16:42:52
 */
@RestController
@RequestMapping("articleInfo")
@RequiredArgsConstructor
@Api(tags = "文章相关接口")
public class ArticleInfoController  {
    /**
     * 服务对象
     */
    private final ArticleInfoService articleInfoService;

    @GetMapping("selectInfoById")
    @ApiOperation("根据id获取文章信息")
    public R<ArticleInfoVO> selectInfoById(@RequestParam Integer id) {
        return R.ok(this.articleInfoService.selectInfoById(id));
    }


}

